package com.dingyuhang.bean;

import java.io.Serializable;
import java.util.List;

/**
 * 板块
 */
public class Forum implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 5949961912893755316L;
	/**
	 * 主键
	 */
	private Integer id;
	/**
	 * 名称
	 */
	private String name;
	/**
	 * 描述信息
	 */
	private String description;

	/**
	 * 排序方式
	 */
	private Integer sorted;
	
	/**
	 * 板块下的贴子集合
	 */
	private List<Topic> topics;

	public Forum() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Forum(Integer id, String name, String description, Integer sorted) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
		this.sorted = sorted;
	}

	@Override
	public String toString() {
		return "Forum [id=" + id + ", name=" + name + ", description=" + description + ", sorted=" + sorted + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Forum other = (Forum) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getSorted() {
		return sorted;
	}

	public void setSorted(Integer sorted) {
		this.sorted = sorted;
	}

	public List<Topic> getTopics() {
		return topics;
	}

	public void setTopics(List<Topic> topics) {
		this.topics = topics;
	}
	
	
	

}
